<template>
  <div class="table_header">
    <el-button type="success" icon="Refresh">

    </el-button>
  </div>

</template>

<script lang="ts" setup>
import {node} from './node_api'
import {onMounted, reactive, ref} from 'vue'
import {ElMessage} from "element-plus";

const search = ref("")
const tableData = ref([])

const value: boolean = true
var dialogVisible = ref(false)

const form = reactive({
  ip: "",
  user:"",
  password:"",
})

const OnSubmit = () => {
  NodeObj.Create(form).then((response) => {
    ElMessage({
      type: 'success',
      message: response.data,
      showClose: true,
    })
    dialogVisible.value = false
  })
}


onMounted(()=>{
  GetNodeData()
})

const GetNodeData = () => {
  NodeObj.List().then(
      (response) => {
        tableData.value = response.data
      }).catch((error) => {
    ElMessage({
      type: 'error',
      message: error,
      showClose: true,
    })
  })
}

</script>

<style scoped lang="scss">
@import "@/styles/table_header.scss";

</style>
